﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.Model;
using System.Data;
using AspNetCs.Enumerations.Channel_Enum;


namespace AspNetCs.IDAL
{
    public interface IArticle
    {
        int AddArticle(Article_Model model);
        int UpdateArticle(Article_Model model);
        Article_Model getArticleModelByArticleID(int ArticleID);
        int DeleteArticle(int ArticleID);

        /// <summary>
        /// 删除文章(物理删除)
        /// </summary>
        /// <param name="ArticleID"></param>
        /// <returns></returns>
        int PhyicDeleteArticle(int ArticleID);

        int CheckArticle(int ArticleID);
        int RebackArticle(int ArticleID);
        int RebackAllArticle();

        /// <summary>
        /// 获得各种不同类型的文章
        /// </summary>
        /// <param name="queryPropertys">要查询的字段(Example:"id,name,user_name"),查询所有字段用"*"</param>
        /// <param name="IsMaster">是否是管理员</param>
        /// <param name="EditorId">发布者编号</param>
        /// <param name="ChannelTypeID">频道类型id(如公墓id、纪念馆id)</param>
        /// <param name="channelType">文章类型用枚举值Channel_Type表示(如公墓、纪念馆)</param>
        /// <returns></returns>
        DataTable getKindsOfArticle(string queryPropertys,int IsMaster,int EditorId,int ChannelTypeID,Channel_Type channelType,int ClassId);


        /// <summary>
        /// 设置或者取消置顶
        /// </summary>
        /// <param name="ArticleId">文章编号</param>
        /// <param name="SubmitOrCancle">0:取消置顶 1:设置置顶</param>
        /// <returns></returns>
        int SetTop(int ArticleId, int SubmitOrCancle);

        /// <summary>
        /// 设置或者取消推荐
        /// </summary>
        /// <param name="ArticleId">文章编号</param>
        /// <param name="SubmitOrCancle">0:取消推荐 1:设置推荐</param>
        /// <returns></returns>
        int SetCommend(int ArticleId,int SubmitOrCancle);


        /// <summary>
        /// 设置或者取消热点
        /// </summary>
        /// <param name="ArticleId">文章编号</param>
        /// <param name="SubmitOrCancle">0:取消热点 1:设置热点</param>
        /// <returns></returns>
        int SetHot(int ArticleId, int SubmitOrCancle);



        /// <summary>
        /// 设置或者取消审核
        /// </summary>
        /// <param name="ArticleId">文章编号</param>
        /// <param name="SubmitOrCancle">0:取消审核 1:设置审核</param>
        /// <returns></returns>
        int SetCheck(int ArticleId, int SubmitOrCancle);
    }
}
